var t = getApp(), a = (require("../../../../utils/point.js"), new (require("../../../../utils/qqmap-wx-jssdk.min.js"))({
    key: "CVUBZ-IXLW6-MVOSQ-MPS7P-4NFTH-T3FDO"
}));

Page({
    data: {
        indicatorDots: !0,
        autoplay: !0,
        tabArr: {
            curHdIndex: 0
        },
        isShow: !1,
        telephone: "13020277000",
        isIpx: !1,
        mapUrl: "",
        curr: 1,
        zhengfuList: [],
        yinhangList: [],
        shangyeList: [],
        gongyuanList: [],
        markers: [ {
            id: 1,
            latitude: 31.23824,
            longitude: 121.229131,
            name: "",
            callout: {
                content: " 虹桥博隆商业广场",
                padding: 10,
                display: "ALWAYS",
                textAlign: "center",
                borderRadius: 5,
                bgColor: "#f4102a",
                fontSize: 12,
                color: "#fff"
            }
        } ],
        xgtlist: [ {
            img: "https://fang-oss.haozu.com/static/image/picture/2020/05/15/effect_1.jpg",
            id: 1,
            name: "1"
        }, {
            img: "https://fang-oss.haozu.com/static/image/picture/2020/05/15/effect_2.jpg",
            id: 2,
            name: "2"
        }, {
            img: "https://fang-oss.haozu.com/static/image/picture/2020/05/15/effect_3.jpg",
            id: 3,
            name: "3"
        }, {
            img: "https://fang-oss.haozu.com/static/image/picture/2020/05/15/effect_location.jpg",
            id: 4,
            name: "区位图"
        } ],
        pmtlist: [ {
            img: "https://fang-oss.haozu.com/static/image/picture/2020/05/19/floor_1.jpg",
            id: 0,
            name: "一层"
        }, {
            img: "https://fang-oss.haozu.com/static/image/picture/2020/05/19/floor_2.jpg",
            id: 1,
            name: "二层"
        }, {
            img: "https://fang-oss.haozu.com/static/image/picture/2020/05/19/floor_3.jpg",
            id: 2,
            name: "三层"
        } ]
    },
    tabFun: function(t) {
        var a = Number(t.target.dataset.id), e = t.currentTarget.dataset.key, i = this.data.tabArr;
        i[e] = a, this.setData({
            tabArr: i
        });
    },
    toggle: function(t) {
        this.setData({
            isShow: !this.data.isShow
        });
    },
    zixun: function() {
        wx.makePhoneCall({
            phoneNumber: this.data.telephone
        });
    },
    largeImage: function(t) {
        t.currentTarget.dataset.id;
        var a = t.currentTarget.dataset.url, e = [];
        e.push(a), wx.previewImage({
            current: a,
            urls: e
        });
    },
    toMapInfo: function(t) {
        wx.navigateTo({
            url: "/pages/zhuanti/bolong/map/map?name=虹桥博隆商业广场&address=华新镇新府中路与华腾路交汇处&lat=31.23824&lng=121.229131&curr=" + this.data.curr + "&source=" + t.currentTarget.dataset.source
        });
    },
    goVR: function() {
        wx.navigateTo({
            url: "/pages/zhuanti/bolong/vr/vr"
        });
    },
    onLoad: function(e) {
        var i = this;
        this.setData({
            isIpx: t.globalData.isIpx
        });
        t.getSecret();
        var n = [ {
            id: 100001,
            latitude: 31.23824,
            longitude: 121.229131
        } ];
        a.search({
            keyword: "政府",
            location: {
                latitude: 31.23824,
                longitude: 121.229131
            },
            distance: "1000",
            page_size: 3,
            success: function(t) {
                for (var a = t.data, e = 0; e < a.length; e++) {
                    var o = a[e], s = {
                        id: e,
                        width: 25,
                        height: 25,
                        latitude: o.location.lat,
                        longitude: o.location.lng
                    };
                    n.push(s);
                }
                i.setData({
                    zhengfuList: t.data,
                    yinhangList: t.data,
                    shangyeList: t.data,
                    gongyuanList: t.data
                });
            },
            fail: function(t) {}
        });
    },
    searchThat: function(t) {
        var e = t.currentTarget, i = this;
        i.setData({
            curr: Number(e.dataset.id)
        });
        i.data.point;
        var n = [ {
            id: 100001,
            latitude: 31.23824,
            longitude: 121.229131
        } ];
        a.search({
            keyword: e.dataset.search,
            location: {
                latitude: 31.23824,
                longitude: 121.229131
            },
            distance: "1000",
            page_size: 3,
            success: function(t) {
                for (var a = t.data, e = 0; e < a.length; e++) {
                    var o = a[e], s = {
                        id: e,
                        width: 25,
                        height: 25,
                        latitude: o.location.lat,
                        longitude: o.location.lng
                    };
                    n.push(s);
                }
                i.setData({
                    zhengfuList: t.data,
                    yinhangList: t.data,
                    shangyeList: t.data,
                    gongyuanList: t.data
                });
            },
            fail: function(t) {}
        });
    },
    onLunch: function() {},
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {
        return {
            title: "虹桥博隆商业广场",
            path: "pages/zhuanti/bolong/index/bolong",
            imageUrl: "https://fang-oss.haozu.com/static/image/picture/2020/05/15/top_banner_1.jpg",
            success: function(t) {
                wx.showToast({
                    title: "转发成功",
                    duration: 2e3,
                    icon: "none"
                });
            },
            fail: function(t) {},
            complete: function(t) {}
        };
    }
});